<?php 
namespace App\Http\Model;

use Illuminate\Database\Eloquent\Model;

class Cate extends Model {

	//
	protected $table = 'cate';
	protected $primarykey = 'id';
	public $timestamps =false;

	// 添加分类
	static 	public function ad($request,$ts){
		$ts->validate($request, [
				'pid' => 'required',
				'cate' => 'required'
			],
			[
				'pid.required' => 'pid不能为空',
	 			'cate.required' => '分类名称不能为空',
			]);
	}
}